<?php  
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

defined('_JEXEC') or die('Retricted Access');
global $mainframe;

JHTML::_('behavior.tooltip');

$list_status = get_codes_of_field('ja_jobs_status');
$job_status = array();
foreach ( $list_status as $rows ){
    $job_status[] = JHTML::_('select.option', $rows->value, $rows->text);
}
?>

<style type="text/css">
	td.key{
		font-weight:normal !important;
		text-align:left !important;
	}
	td.master{
		font-weight:bold !important;
	}
</style>

<form action="index.php" method="post" name="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<?php echo $this->getTabs();?>
	</fieldset>	
	<fieldset class="adminform">
		
		<table class="admintable" width="100%">
		<tbody>		
			<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_('Job posting'); ?>					
				</td>				
			</tr>	
			<tr>
				<td width="30%" class="key">
					<label for="first_posting_status" class="editlinktip hasTip" title="<?php echo JText::_( 'STATUS OF NEW JOB POSTING TOOLTIP' ); ?>"><?php echo JText::_("Status of new job posting"); ?></label>:
				</td>
				<td width="70%">
					<?php echo JHTML::_('select.genericlist', $job_status, 'posts[first_posting_status]', 'class="inputbox" size="1"', 'value', 'text', $this->params->get('first_posting_status'));?>					
					
				</td>
			</tr>
			<tr>
				<td class="key ">
					<label for="premium_posting_fee_enabled" class="editlinktip hasTip" title="<?php echo JText::_( 'HOW MANY DAYS DOES STANDARD POSTING EXPIRE TOOLTIP' ); ?>"><?php echo JText::_( 'How many days does Standard posting expire?' ); ?></label>
				</td>
				<td>
					<input type="text" value="<?php echo $this->params->get('posts_display_days');?>" size="3" name="posts[posts_display_days]" id="posts_display_days"/> <?php echo JText::_( 'days' ); ?>
				</td>
			</tr>
			<tr>
				<td class="key">
					<label for="posts_show_days_elapsed" class="editlinktip hasTip" title="<?php echo JText::_( 'HOW MANY DAYS DOES PREMIUM POSTING EXPIRE TOOLTIP' ); ?>"><?php echo JText::_('How many days does Premium posting expire?'); ?></label>
				</td>
				<td>
					<input type="text" value="<?php echo $this->params->get('posts_show_days_elapsed');?>" size="3" name="posts[posts_show_days_elapsed]" id="posts_show_days_elapsed"/> <?php echo JText::_( 'days' ); ?>
					
				</td>
			</tr>
			<tr>
				<td class="key">
					<label for="check_expired_jobs_duration" class="editlinktip hasTip" title="<?php echo JText::_( 'HOW MANY HOURS WILL EXPIRED JOBS TOOLTIP' ); ?>"><?php echo JText::_('How many hours will expired jobs be automatically checked and archived?'); ?></label>
				</td>
				<td>
					<input type="text" value="<?php echo $this->params->get('check_expired_jobs_duration');?>" size="3" name="posts[check_expired_jobs_duration]" id="check_expired_jobs_duration"/> <?php echo JText::_( 'hours' ); ?>
					
				</td>
			</tr>		
			
			<tr>
				<td class="key">
					<label for="posts_show_days_elapsed"  class="editlinktip hasTip" title="<?php echo JText::_( 'MAXIMUM CATEGORIES SELECTION FOR JOB POSTING TOOLTIP' ); ?>"><?php echo JText::_('Maximum categories selection for Job posting:'); ?></label>
				</td>
				<td>
					<input type="text" value="<?php echo $this->params->get('maximum_cats', 3);?>" size="3" name="posts[maximum_cats]" id=maximum_cats/>					
				</td>
			</tr>
			
			<tr>
				<td class="key">
					<label for="posts_show_days_elapsed"  class="editlinktip hasTip" title="<?php echo JText::_( 'MAXIMUM LOCATIONS SELECTION FOR JOB POSTING TOOLTIP' ); ?>"><?php echo JText::_('Maximum locations selection for Job posting:'); ?></label>
				</td>
				<td>
					<input type="text" value="<?php echo $this->params->get('maximum_locations', 3);?>" size="3" name="posts[maximum_locations]" id=maximum_locations/>					
				</td>
			</tr>
				
			<tr>
				<td class="key ">
					<label for="posts_show_description"  class="editlinktip hasTip" title="<?php echo JText::_( 'DISPLAY JOB DESCRIPTION WITHIN JOB LIST TOOLTIP' ); ?>"><?php echo JText::_("Display Job description within job list"); ?>:</label>
				</td>
				<td>
					<input type="radio" <?php if(!$this->params->get('posts_show_description')) echo "checked";?> value="0" name="posts[posts_show_description]"/>
					<?php echo JText::_( 'No' ); ?>
					<input type="radio" <?php if($this->params->get('posts_show_description')) echo "checked";?> value="1" name="posts[posts_show_description]" id="posts_show_description"/>
					<?php echo JText::_( 'Yes' ); ?>
					<?php echo "[".JText::_( 'Cut off after' ); ?>&nbsp;
					<input type="text" value="<?php echo $this->params->get('posts_description_chars');?>" size="3" name="posts[posts_description_chars]"/>&nbsp;
					<?php echo JText::_( 'characters' )."]"; ?>					
				</td>
			</tr>
			
			<tr>
				<td class="key ">
					<label for="postsposts_show_posted_by"  class="editlinktip hasTip" title="<?php echo JText::_( 'DISPLAY POSTED BY WITHIN JOB LIST TOOLTIP' ); ?>"><?php echo JText::_('Display "Posted by" within job list'); ?>:</label>
				</td>
				<td>
					<?php $posts_show_posted_by = $this->params->get('posts_show_posted_by')?1:0;?>
					<?php echo JHTML::_('select.booleanlist', 'posts[posts_show_posted_by]', '', $posts_show_posted_by);?>					
				</td>
			</tr>		
			<tr>
				<td class="key ">
					<label for="postsposts_show_job_type"  class="editlinktip hasTip" title="<?php echo JText::_( 'DISPLAY CATEGORY WITHIN JOB LIST TOOLTIP' ); ?>"><?php echo JText::_("Display Category within job list"); ?>:</label>
				</td>
				<td>
					<?php $posts_show_job_type = $this->params->get('posts_show_job_type')?1:0;?>
					<?php echo JHTML::_('select.booleanlist', 'posts[posts_show_job_type]', '', $posts_show_job_type);?>
					
				</td>
			</tr>
			<tr>
				<td class="key ">
					<label for="posts[posts_show_days_elapsed]"  class="editlinktip hasTip" title="<?php echo JText::_( 'SHOW THE DAY TOOLTIP' ); ?>"><?php echo JText::_( "Show the Day, and how many days elapsed (Group posts by day)?" ); ?></label>
				</td>
				<td>
					<?php $posts_show_days_elapsed = $this->params->get('postsshow_days_elapsed')?1:0;?>
					<?php echo JHTML::_('select.booleanlist', 'posts[postsshow_days_elapsed]', '', $posts_show_days_elapsed);?>					
				</td>
			</tr>	
			
			
			
			<tr>
				<td class="key">
					<label for="filter_order"  class="editlinktip hasTip" title="<?php echo JText::_( 'JOB LIST ORDER BY TOOLTIP' ); ?>"><?php echo JText::_('Job list order by?'); ?></label>
					
				</td>
				<td>
					<select name="posts[filter_order]" id="filter_order">
						<option value="is_hotjob" <?php if($this->params->get('filter_order')=='is_hotjob') echo "selected";?>><?php echo JText::_('Premium Job');?></option>
						<option value="effected_date" <?php if($this->params->get('filter_order')=='effected_date') echo "selected";?>><?php echo JText::_('Effected Date');?></option>
						<option value="id" <?php if($this->params->get('filter_order')=='id') echo "selected";?>><?php echo JText::_('Job ID');?></option>
					</select>
					<select name="posts[filter_order_Dir]" id="filter_order_Dir">
						<option value="asc" <?php if($this->params->get('filter_order_Dir')=='asc') echo "selected";?>><?php echo JText::_('ASC');?></option>
						<option value="desc" <?php if($this->params->get('filter_order_Dir')=='desc') echo "selected";?>><?php echo JText::_('DESC');?></option>
					</select>
				</td>
			</tr>						
			
			<tr>
				<td class="key ">
					<label for="display_num"  class="editlinktip hasTip" title="<?php echo JText::_( 'NUMBER ITEMS PER PAGE TOOLTIP' ); ?>"><?php echo JText::_( "Number items per page" ); ?>:</label>
				</td>
				<td>
					<input size="3" type="text" value="<?php echo $this->params->get('display_num', 20);?>" name="posts[display_num]" id="display_num" />					
				</td>
			</tr>
			<tr>
				<td class="key ">
					<label for="posts[allow_apply_several_time]"  class="editlinktip hasTip" title="<?php echo JText::_( 'ALLOW USER TO APPLY FOR ONE JOB SEVERAL TIMES TOOLTIP' ); ?>"><?php echo JText::_("Allow user to apply for one job several times?"); ?>:</label>
				</td>
				<td>
					<?php $posts_enable_verify_code = $this->params->get('allow_apply_several_time')?1:0;?>
					<?php echo JHTML::_('select.booleanlist', 'posts[allow_apply_several_time]', '', $posts_enable_verify_code);?>
				</td>
			</tr>	
			<tr>
				<td class="key ">
					<label for="apply_options"  class="editlinktip hasTip" title="<?php echo JText::_( 'ENABLE APPLY TYPE TOOLTIP' ); ?>"><?php echo JText::_("Enable apply type?"); ?>:</label>
				</td>
				<td>
					<?php echo $this->obj_apply_option; ?>
				</td>
			</tr>
			<tr>
				<td class="key ">
					<label for="posts[enable_verify_code]"  class="editlinktip hasTip" title="<?php echo JText::_( 'ENABLE CODE VERIFICATION FOR APPLICATION TOOLTIP' ); ?>"><?php echo JText::_("Enable code verification for application?"); ?>:</label>
				</td>
				<td>
					<?php $posts_enable_verify_code = $this->params->get('enable_verify_code')?1:0;?>
					<?php echo JHTML::_('select.booleanlist', 'posts[enable_verify_code]', '', $posts_enable_verify_code);?>
				</td>
			</tr>
			<!--<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_( 'Premium Posts' ); ?>
					
				</td>				
			</tr>	
					
			<tr>
				<td class="key ">
					<label for="premium_posts_limit"><?php echo JText::_( "Premium Posts per page" ); ?></label>:
				</td>
				<td>
					<input type="radio" <?php if(!$this->params->get('premium_posts_limit')) echo "checked";?> value="0" name="posts[premium_posts_limit]"/>
					<?php echo JText::_( 'Unlimited' ); ?>
					<input type="radio" <?php if($this->params->get('premium_posts_limit')) echo "checked";?> value="1" name="posts[premium_posts_limit]" id="premium_posts_limit"/>
					<?php echo JText::_( 'Yes' ); ?>
					[<?php echo JText::_( 'only show' ); ?>
					<input type="text" value="<?php echo $this->params->get('premium_posts_per_page')?>" size="3" name="posts[premium_posts_per_page]"/>
					<?php echo JText::_( ' post first' ); ?>]
					
				</td>
			</tr>		
			<tr>
				<td class="key ">
					<label for="postsp_posts_show_days_elapsed"><?php echo JText::_( "Group Premium posts by day of week?" ); ?></label>:
				</td>
				<td>
					<?php $p_posts_show_days_elapsed = $this->params->get('p_posts_show_days_elapsed')?1:0;?>
					<?php echo JHTML::_('select.booleanlist', 'posts[p_posts_show_days_elapsed]', '', $p_posts_show_days_elapsed);?>
					
				</td>
			</tr>	-->
			
		</tbody>
		</table>
	</fieldset>
</div>
<div class="clr"></div>
<input type="hidden" name="option" value="<?php echo JBCOMNAME; ?>" />
<input type="hidden" name="view" value="jaconfiguration" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="tab" value="<?php echo $this->tab; ?>" />
<input type="hidden" name="cid" value="<?php echo $this->cid; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>	
 </form>